﻿using Cofe.Core.Interfaces;
using Cofe.Core.Property;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Cofe.Core.Filter
{
    /// <summary>
    /// Used to construct filter based on id and parameter.
    /// </summary>
    public interface IFilterFactory : ICofeService
    {
        Dictionary<string, Type> SupportedFilterTypes { get; }

        /// <summary>
        /// Construct and return a filter based on name and parameters, return null if not supported.
        /// </summary>
        /// <param name="name"></param>
        /// <param name="value"></param>
        /// <returns></returns>
        T Construct<T>(string name, string value) where T : IFilter;


        IPathParser[] PathParsers { get; set; }
        IPropertyDictionary PropertyDictionary { get; set; }
    }
}
